package com.itzhoun.sort;

import java.util.List;

/**
 * @author zhounan
 * @Title: design-patterns
 * @Description: TODO
 * @date 30/7/2023下午 9:58
 */
public class Environment {

    private SortStrategy sortStrategy;

    private String type;

    public Environment(SortStrategy sortStrategy, String type) {
        this.sortStrategy = sortStrategy;
        this.type = type;
    }

    public Environment(){}


    public void sort(List<Person> personList){

        this.sortStrategy.sort(personList, type);

    }
}
